<!--
  @author wangjie
  @since 2019/06/13 13:58
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/common::jscss"/>
<body>

<!--页面顶层div-->
<div class="layui-fluid">
    <!--页面板块
        通常情况下一个页面只有一个板块，
        列表页的一个板块内包含搜索条件、表格、表格工具条、分页导航，
        详情页的一个板块内包含详情列表、表单和按钮栏
        -->
    <div class="layui-card">
        <!--页面板块内容
            通常为详情列表、表单内容或表格
            -->
        <div class="layui-card-body">

            <!--表单样式统一为layui-form(必需样式)，lay-filter属性统一定义为zmn-form-->
            <form method="POST" action="" class="layui-form" lay-filter="zmn-form">
                <input type="hidden" name="relateId" th:value="${item.relateId}">
                <label class="layui-form-label">销售价</label>
                <div class="layui-input-block">
                    <div class="layui-form-item">
                        <label class="layui-form-label layui-form-required">技术服务费：</label>
                        <div class="layui-input-inline">
                            <input type="text" name="hourFee" id="hourFee" lay-filter="hourFee"
                                   th:value="${item.hourFee}" placeholder="技术工时费"
                                   lay-verify="required" autocomplete="off" class="layui-input"/>
                        </div>
                        <label class="layui-form-label">影响系数：</label>
                        <div class="layui-input-inline" style="width: 120px">
                            <input type="checkbox" name="hourFeeImpactfactor" th:checked="${item.hourFeeImpactfactor!=null && item.hourFeeImpactfactor.indexOf('1')>-1}" value="1" title="品牌系数" />
                        </div>
                        <div class="layui-input-inline" style="width: 120px">
                            <input type="checkbox" name="hourFeeImpactfactor" th:checked="${item.hourFeeImpactfactor!=null && item.hourFeeImpactfactor.indexOf('2')>-1}" value="2" title="渠道系数" />
                        </div>
                        <div class="layui-input-inline" style="width: 120px">
                            <input type="checkbox" name="hourFeeImpactfactor" th:checked="${item.hourFeeImpactfactor!=null && item.hourFeeImpactfactor.indexOf('3')>-1}" value="3" title="城市系数" />
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label layui-form-required">往返路途费：</label>
                        <div class="layui-input-inline">
                            <input type="text" name="trafficFee" id="trafficFee" lay-filter="trafficFee"
                                   th:value="${item.trafficFee}" placeholder="往返路途费"
                                   lay-verify="required" autocomplete="off" class="layui-input"/>
                        </div>
                        <label class="layui-form-label">影响系数：</label>
                        <div class="layui-input-inline" style="width: 120px">
                            <input type="checkbox" name="trafficFeeImpactfactor" th:checked="${item.trafficFeeImpactfactor!=null && item.trafficFeeImpactfactor.indexOf('1')>-1}" value="1" title="品牌系数"/>
                        </div>
                        <div class="layui-input-inline" style="width: 120px">
                            <input type="checkbox" name="trafficFeeImpactfactor" th:checked="${item.trafficFeeImpactfactor!=null && item.trafficFeeImpactfactor.indexOf('2')>-1}" value="2" title="渠道系数"/>
                        </div>
                        <div class="layui-input-inline" style="width: 120px">
                            <input type="checkbox" name="trafficFeeImpactfactor" th:checked="${item.trafficFeeImpactfactor!=null && item.trafficFeeImpactfactor.indexOf('3')>-1}" value="3" title="城市系数"/>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label layui-form-required">配件费：</label>
                        <div class="layui-input-inline">
                            <input type="text" name="partFee" id="partFee" lay-filter="partFee"
                                   th:value="${item.partFee  == null ? 0 : item.partFee}" placeholder="配件费"
                                   lay-verify="required" autocomplete="off" class="layui-input"/>
                        </div>
                        <label class="layui-form-label">影响系数：</label>
                        <div class="layui-input-inline" style="width: 120px">
                            <input type="checkbox" name="partFeeImpactfactor" th:checked="${item.partFeeImpactfactor!=null && item.partFeeImpactfactor.indexOf('1')>-1}" value="1" title="品牌系数" />
                        </div>
                        <div class="layui-input-inline" style="width: 120px">
                            <input type="checkbox" name="partFeeImpactfactor" th:checked="${item.partFeeImpactfactor!=null && item.partFeeImpactfactor.indexOf('2')>-1}" value="2" title="渠道系数" />
                        </div>
                        <div class="layui-input-inline" style="width: 120px">
                            <input type="checkbox" name="partFeeImpactfactor" th:checked="${item.partFeeImpactfactor!=null && item.partFeeImpactfactor.indexOf('3')>-1}" value="3" title="城市系数" />
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">销售总价：</label>
                        <label class="layui-form-label" style="text-align: left;color: red" id="totalPrice">0</label>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">内部价</label>
                </div>
                <div class="layui-input-block">
                    <div class="layui-form-item">
                        <label class="layui-form-label">内部价：</label>
                        <div class="layui-input-inline">
                            <input type="text" name="internalSettlementPrice" id="internalSettlementPrice" lay-filter="internalSettlementPrice"
                                   th:value="${item.internalSettlementPrice}" placeholder="内部价"
                                   autocomplete="off" class="layui-input"/>
                        </div>
                        <label class="layui-form-label">影响系数：</label>
                        <div class="layui-input-inline" style="width: 120px">
                            <input type="checkbox" name="internalSettlementPriceImpactfactor" th:checked="${item.internalSettlementPriceImpactfactor!=null && item.internalSettlementPriceImpactfactor.indexOf('1')>-1}" value="1" title="品牌系数" />
                        </div>
                        <div class="layui-input-inline" style="width: 120px">
                            <input type="checkbox" name="internalSettlementPriceImpactfactor" th:checked="${item.internalSettlementPriceImpactfactor!=null && item.internalSettlementPriceImpactfactor.indexOf('2')>-1}" value="2" title="渠道系数" />
                        </div>
                        <div class="layui-input-inline" style="width: 120px">
                            <input type="checkbox" name="internalSettlementPriceImpactfactor" th:checked="${item.internalSettlementPriceImpactfactor!=null && item.internalSettlementPriceImpactfactor.indexOf('3')>-1}" value="3" title="城市系数" />
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"></label>
                        <div class="layui-input-inline">内部价不设置默认=销售价</div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">外部价</label>
                </div>
                <div class="layui-input-block">
                    <div class="layui-form-item">
                        <label class="layui-form-label">外部价：</label>
                        <div class="layui-input-inline">
                            <input type="text" name="externalSettlementPrice" id="externalSettlementPrice" lay-filter="externalSettlementPrice"
                                   th:value="${item.externalSettlementPrice}" placeholder="外部价"
                                   autocomplete="off" class="layui-input"/>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"></label>
                        <div class="layui-input-inline">外部价不设置默认=销售价</div>
                    </div>
                </div>
                <div class="layui-form-item submit">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">提交</button>
                        <button type="button"  class="layui-btn layui-btn-primary" onclick="zmnLayUtil.closeThisIframeMsg(parent);">取消</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
</html>
<!--主js代码置于html外-->
<script type="text/javascript" th:inline="javascript">

    let json = {
        productId: [[${productId}]],
        serviceItem: [[${serviceItem}]]
    };

    layui.config({
        version: 20191127,
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        serv_product_tariffproductitem3_setprice: "product/service/tariffproductitem3/zmn.product.tariff.group.setprice",
    }).use(['index', 'serv_product_tariffproductitem3_setprice']);

</script>
